/*
 * Copyright (C) 2013 Daniel Treffenstädt <daniel@treffenstaedt.de>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301  USA
 */

#include "OFont.h"

O_START_NAMESPACE

Font::Font() :
	m_name(String("monospace")),
	m_size(13),
	m_hAlign(HAlign::Left),
	m_vAlign(VAlign::Top),
	m_wrap(Wrap::Word),
	m_italic(false),
	m_weight(100),
	m_underlined(false)
{
}

Font::Font(String name, short size, bool i, int weight, bool u, HAlign h, VAlign v, Wrap w) :
	m_name(name),
	m_size(size),
	m_hAlign(h),
	m_vAlign(v),
	m_wrap(w),
	m_italic(i),
	m_weight(weight),
	m_underlined(u)
{
}

String Font::name()
{
	return m_name;
}

short Font::size()
{
	return m_size;
}

bool Font::italic()
{
	return m_italic;
}

int Font::weight()
{
	return m_weight;
}

bool Font::underlined()
{
	return m_underlined;
}

Font::HAlign Font::hAlign()
{
	return m_hAlign;
}

Font::VAlign Font::vAlign()
{
	return m_vAlign;
}

Font::Wrap Font::wrap()
{
	return m_wrap;
}

void Font::operator =(Font f)
{
	m_name			= f.m_name;
	m_size			= f.m_size;
	m_italic		= f.m_italic;
	m_weight		= f.m_weight;
	m_underlined	= f.m_underlined;
	m_hAlign		= f.m_hAlign;
	m_vAlign		= f.m_vAlign;
	m_wrap			= f.m_wrap;
}

O_END_NAMESPACE
